<% div_for comment do %>
	<p>
	<strong>Added by <%= link_to User.find_by_id(comment.user_id).username, :controller => "site", :action => "gallery", :id => comment.user_id, :page => 1 %> 
<%= time_ago_in_words(comment.created_at) %> ago</strong><br />
	<%= h(comment.body) %>
	</p>

	<% if session[:user_id] == comment.user_id -%>
		<p><%= link_to "Edytuj komentarz", :controller => "comments", :action => "edit", :id => comment.id %></p>
	<% end -%>

	<% if session[:user_id] != nil -%>
		<% if User.find(session[:user_id]).is_admin -%>
			<p><%= link_to "Usuń komentarz", :controller => "comments", :action => "remove", :id => comment.id %></p>
        	<% end -%>
	<% end -%>

<% end %>
